define(["jquery", "easy-admin"], function ($, ea) {

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'crm/business.product/index',
		change_url: 'crm/business.product/change'
    };

    var Controller = {

        index: function () {

            ea.table.render({
                init: init,
				toolbar: [],
				defaultToolbar:['filter'],
                cols: [[
                    { field: 'id', width: 60, title: 'ID', sort: true,search:false },
                    { field: 'name', title: '课程名称' },
                    { field: 'price', title: '价格', width: 130, sort: true,search:false},
                    { field: 'major.name',title: '所属专业'},
                    { field: 'campus.name',title: '开设校区'},
                    { 
						title: '操作', 
						minWidth: 80, 
						width: 160, 
						templet: ea.table.tool, 
						align: "center", 
						fixed: 'right',
						operat: ['change']
					}
                ]],
            });

            ea.listen();
        }
    };
    return Controller;
});